home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff391.lzh / FractalLab / Fractal Lab.Docs < prev    next >
Text File  |  1990-10-27  |  13KB  |  266 lines

  1. //////// Fractal Lab 1.0, ©1990 by Terry W. Gintz ///////
  2.  
  3. The science of Fractals was formally introduced by Benoit Mendelbrot in his
  4. "preface" The Fractal Geometry of Nature.  While being very descriptive of
  5. various recursive fractal curves, such as the Koch and Peano curves, this
  6. book says very little on the art of generating such curves with a computer.
  7. Fractal Lab was written to enable a generalized creation of what Mandelbrot
  8. terms self-similiar and self-contacting/non-contacting recursive curves.
  9. Most of these basic curves appearing in The Fractal Geometry of Nature can
  10. be produced using Fractal Lab.  And these can be done in color, up to 8
  11. colors.  Mandelbrot illustrated these only in black, white and gray scale.
  12. No attempt is made to draw the Mandelbrot set or other complex-number sets.
  13. Fractal landscapes are also outside the scope of this program.
  14.  
  15. Mandelbrot uses the terms "generator" and "initiator" to describe the basic
  16. building blocks of self-similiar curves.  The generator describes the way a
  17. curve is broken down into smaller images of itself.  The initiator describes
  18. how the generator is used.  The generator for a koch curve would resemble a
  19. line split into three sections, the middle section being replaced with the
  20. upper two legs of a equilateral triangle.  The initiator would be a triangle
  21. to form a "koch island".  There are various rules for randomizing the
  22. generator and placement of the generator.  These will be explained in the
  23. menu command descriptions.
  24.  
  25. Fractal Lab does more than emulate parts of The Fractal Geometry of Nature,
  26. because it allows one to generate other curves not shown there, and possibly
  27. unimagined ones too.  A sample of the curves possible is included on the
  28. program disk.  At the higher levels of recursion, some of these curves take
  29. on three-dimensional qualities like molecular models, etc.
  30.  
  31. This program uses a hi-res/interlace screen with overscan for all drawing and
  32. editing.  The screen is 672 by 432.  You may need to adjust both your
  33. monitor and run a program like More Rows to view all of it.  Lower
  34. resolutions do not produce the desired quality of display for this type of
  35. graphics.  Overscan adds to the resolution and quality.
  36. Flicker does appear to be bothersome at times, especially with system
  37. requesters.  There are used sparingly.  The high use of chip memory in the
  38. main drawing screen made swapping custom screens for editing undesirable.
  39.  
  40. Topaz 60 was selected for menu and editing fonts to improve readability in
  41. the interlace mode.  No attempt was made to customize the color palette to
  42. reduce flicker.  Certainly, a palette-change program could be used as a
  43. background process, to do this.  Fractal Lab should multi-task without
  44. problems.  When in a wait state, the program uses Wait() or Delay() to enable
  45. other tasks to run at full speed.  While drawing, there is no Wait or Delay
  46. for maximum drawing speed.  You may need to set the priortity for Fractal
  47. Lab lower while drawing to let other tasks run at normal speed.
  48.  
  49. About the Menus:
  50.  
  51. The Project Menu:
  52.  
  53. "New" erases the current generator and initiator.  A koch fractal is loaded
  54. and displayed if no command arguments are used in invoking Fractal Lab.
  55.  
  56. "Clear" clears the screen and sets the background color to what is selected
  57. on the Background Menu (1 of 8 colors).
  58.  
  59. "Draw" invokes the level window, then draws the current fractal at the
  60. specified level of recursion.  Does not clear the screen before drawing or
  61. change the background color.  Click the left-mouse button to stop a drawing
  62. in progress.
  63.  
  64. "Move" changes the cursor to a green plus to locate the fractal's starting
  65. point anywhere on the screen, overriding the setting of the initiator.
  66. Click where you want the fractal to start drawing.  Useful for tiling
  67. multiple fractals on the screen, or putting different fractals side by side.
  68. Does not clear the screen before drawing, nor change the random factor when
  69. the RANDOMSIDES flag is set.  This enables random dragons to be moved.
  70.  
  71. "Save" saves the current settings on the Flags and Background menus, and the
  72. data for the generator and initiator segments.  Also creates a custom icon
  73. for each fractal file that can invoke Fractal Lab from the workbench and
  74. draw itself.  The current level is also saved.  You can save a fractal with
  75. only a generator or only an initiator, but it won't get drawn
  76. the next time it is loaded.
  77.  
  78. "Load" loads a fractal file previously saved by Fractal Lab and draws the
  79. fractal like "Draw" without clearing the screen or changing the background
  80. color, and using the saved level of recursion.
  81.  
  82. "Quit" exits the program.
  83.  
  84. The Edit menu:
  85.  
  86. "Generator" invokes the Edit Generator window explained below.
  87.  
  88. "Initiator" invokes the Edit Initiator window explained below.
  89.  
  90. "Scale" invokes the Scale Initiator window explained below.
  91.  
  92. The Flags Menu:
  93.  
  94. These items define some rules for placing the generator while drawing.
  95.  
  96. ALTERNATE tells the generate routine to reverse the side placement of the
  97. generator at each stage of recursion.  Must be set to draw snowflakes, etc.
  98. ALTERNATE excludes the RANDOMSIDES and ALTFIRSTPOS flags and enables the
  99. RANDOMREVERSE flag to be set or not.
  100.  
  101. RANDOMSIDES randomizes the side the generator is placed on at the first stage
  102. of each level of recursion after the first recursion.  Must be set to draw
  103. random dragons.  Excludes ALTERNATE, ALTFIRSTPOS and disables the
  104. RANDOMREVERSE item.
  105.  
  106. RANDOMREVERSE reverses the generator without changing the side it is to be
  107. draw on.  Used to create random snowflakes, etc.
  108.  
  109. ALTFIRSTPOS alternates the generator every other level starting with the
  110. lowest level.  Excludes ALTERNATE and RANDOMSIDES.  Used for the Polya
  111. fractal.
  112.  
  113. REVRIGHTSIDE reverses the generator when it is drawn on the right side.
  114. Used for the Peano-Gosper fractal and Quartet fractal. Can be used with any
  115. of the other flags, for different effects.
  116.  
  117. NO FLAGS excludes all other flags and disables RANDOMREVERSE.  Use
  118. to display the original dragon curve, or to eliminate the random factor from
  119. any curve that doesn't use ALTERNATE or RANDOMSIDES.
  120.  
  121. The Background menu:
  122.  
  123.    One of eight items selects the background color that will be displayed
  124. the next time the screen is cleared with Clear.  Selection is also saved
  125. with the Save option.
  126.  
  127. About the windows:
  128.  
  129. The main window is used for drawing and all other windows/requesters appear
  130. on top of it.  It contains depth-adjust gadgets at the top right, though
  131. these are covered up after the first drawing is displayed.  Use the depth
  132. adjusters to move the edit windows out of sight if you need to refer to the
  133. drawing details, then to move the edit windows back.
  134.  
  135. The Edit Generator window allows you to add and edit up to 30 segments for
  136. the fractal generator.  The top row of gadgets are the control gadgets and
  137. the lower gadgets are for entering data.  There are error messages that
  138. appear between these sets of gadgets to help the user with input.
  139.  
  140. The Control gadgets:
  141.  
  142. The # gadget is used to enter a number within the range of existing segments
  143. to insert or recall a segment for changing or deleting.  You can also insert
  144. what you recall or add it back too.
  145.  
  146. The Add gadget adds a segment to the end of the list of generator
  147. segments.  You must first enter a valid segment into the data gadgets.
  148.  
  149. The Change and Delete Gadgets are enabled after using the Recall gadget, to
  150. edit or delete a previously added or inserted segment.
  151.  
  152. The Insert gadget works with the # gadget to add a segment in front of the
  153. previously added segment.
  154.  
  155. The Recall gadget enters a previously-added segment into the data gadgets,
  156. to enable editing or deleting it.  This prevents erasing or changing a
  157. segment, with the wrong number in the # gadget.
  158.  
  159. The Cancel gadget cancels a recall operation and re-enables the # and Recall
  160. gadgets.
  161.  
  162. The Data gadgets:
  163.  
  164. The Relative Direction gadget defines the direction of the segment relative
  165. to the 90 degree position, (0 is straight up), or full right.
  166. The relative direction ranges from -180 to 180 (degrees).
  167.  
  168. The Relative Length gadget defines the length of the segment as a
  169. fraction of the total length of the initiator segment length.  This ranges
  170. from -1.0 to 1.0.  Enter a negative length if you want to move to a new
  171. segment location, instead of drawing the line there.  This is useful for
  172. creating "tree" fractals and "island" fractals whose segments are not
  173. necessarily continuous.  When you enter a negative length, you must also
  174. enter a relative direction 180 degrees from the direction you want to move,
  175. or the opposite direction (a move is computed as a negative direction.)
  176. All fractional input is rounded to five decimal places.
  177.  
  178. The Side gadget determines which side the generator will appear at the next
  179. recursion level subject to the settings of the Flags menu, right (0)
  180. or left (1).
  181.  
  182. There are 8 color gadgets that can be selected for the segment color.  The
  183. current color is drawn to right of the word Colors.
  184.  
  185. The Edit Initiator window is the editor for the fractal initiator.  It has
  186. control gadgets that work the same as those with the generator editor, and
  187. different data gadgets.  You can add or edit up to 30 segments for each
  188. initiator.
  189.  
  190. The Data gadgets:
  191.  
  192. The Direction gadget defines the direction of the initiator segment relative
  193. to 0 degrees, or straight up.  Acceptable angles are 0 to 359 degrees.
  194.  
  195. The Length gadget defines the length of the segment in screen pixels, 1 to
  196. 672.
  197.  
  198. The Side gadget controls which side the generator is placed initially,
  199. left (1) or right (0).  For a segment going right 90 degrees, this would
  200. place the first generator upright.
  201.  
  202. The Left, Right, LeftBottom, RightBottom gadgets set the start and end
  203. positions on screen for each initiator segment.  If you don't know the end
  204. position, given the starting position and segment length, you will have to
  205. use a trig function to approximate it.  The formulas are as follows:
  206.  
  207.    Right = Left + Sine(degrees) * length
  208.    RightBottom = LeftBottom - Cosine(degrees) * length
  209.  
  210. where degrees is the segment direction. These formulas are accurate plus or
  211. minus a pixel.  Under some conditions, aberations will be notices due
  212. to the floating point arithmetic used in Fractal Lab.  You may want
  213. to experiment with the end points to get the most accurate results.
  214.  
  215. If you don't have a calculator with sine and cosine functions,--
  216. The COMPUTE gadget uses the above formulas to enter the approximate end
  217. points into the Right and RightBottom gadgets. (And you thought trig was
  218. work!)  Just be sure to enter valid information in the other data gadgets
  219. before clicking COMPUTE.  Won't compute the end coordinates if they would
  220. be off the screen.
  221.  
  222. Note: angles may appear a few degrees off on the finished fractal, if the
  223. screen pixel on your monitor is not exactly square.  Relative space between
  224. lines should still allow non-contacting fractals to remain non-contacting.
  225.  
  226. The Scale Window scales the initiator length and screen positions to
  227. effectively reduce or expand the fractal image.  A scale of .5 affects both
  228. X and Y coordinates, so the image is quartered.  A scale of 2.0 would make
  229. the image four times as large.  A range of .1 to 5.0 is allowed in the scale
  230. gadget, but the program checks that the length never exceeds 672, and the
  231. other points do not exceed screen limits.  A fractal may still attempt to
  232. draw itself off screen, and is then clipped.  Lines that would end off the
  233. screen are not drawn.
  234.  
  235. The level window controls the number of recursions the generate routine must
  236. go through before it draws the resulting fractal.  The limit is currently
  237. 20.  This requires a stack of 20000.  The icons that the save function
  238. create each time a fractal is saved automatically set the stack to 20000.
  239.  
  240. There are also requesters that control file retreival and saving files, and
  241. request confirmation before exiting the program or erasing the current
  242. fractal generator and initiator.  The file requester is the standard Charlie
  243. Heath requester (not ARP) with a few modifications to allow loading and
  244. saving files to any directory.  Enter the directory required in the upper
  245. box, press <return>, or don't enter anything for current directory.
  246. Click on a file name from the file list, or type in a file name in the
  247. bottom box.  Click on Okay to load or save the file, or select Cancel to
  248. cancel the file operation.
  249.  
  250. For more introductory information on fractals, read Mandelbrot's The Fractal
  251. Geometry of Nature, published by W.H. Freeman and Company, New York, 1983.
  252. A more advanced book on fractals, complete with computer algorithms, is
  253. The Science of Fractal Images by Barnsley, Devaney, Mandelbrot and others,
  254. published by Springer-Verlag, New York, 1988.
  255.  
  256. Any questions, comments or donations for Fractal Lab should be address to:
  257.  
  258. Terry W. Gintz
  259. 4237 Marcum Lane
  260. Eugene, Or 97402
  261.  
  262. A donation of $20 for Fractal Lab gets you the documentation to all my current
  263. programs, plus additional help with Fractal Lab if you need it, plus any of
  264. the other programs for $5 off their suggested price, plus upgrade privileges
  265. for $10.
  266.